package chapter6.chapter6_9;

class Fu {
    public void show() {
        System.out.println("Fu show");
    }
}
class Zi extends Fu {//子类重写了父类的show方法
    public void show() {
        System.out.println("Zi show");
    }
}
public class ExtendsDemo05{
    public static void main(String[] args) {
        Zi z = new Zi();
        // 子类中有show方法，只执行重写后的show方法
        z.show();
        // Zi show
    }
}
